package com.pet.platform.service;

import com.pet.platform.common.PageResult;
import com.pet.platform.dto.UserDTO;
import com.pet.platform.dto.UserQueryDTO;
import com.pet.platform.entity.User;
import com.pet.platform.security.dto.AuthResponse;
import com.pet.platform.security.dto.LoginRequest;
import com.pet.platform.security.dto.RegisterRequest;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.web.multipart.MultipartFile;

public interface UserService extends UserDetailsService {
    User findById(Long id);
    
    User findByUsername(String username);
    
    PageResult<UserDTO> findPage(UserQueryDTO queryDTO);
    
    void create(UserDTO userDTO);
    
    void update(Long id, UserDTO userDTO);
    
    void delete(Long id);
    
    void updateStatus(Long id, Integer status);
    
    Long getCurrentUserId();
    
    AuthResponse login(LoginRequest loginRequest);
    
    void register(RegisterRequest registerRequest);
    
    void logout();
    
    AuthResponse getCurrentUserInfo();
    
    void changePassword(String oldPassword, String newPassword);
    
    String updateAvatar(MultipartFile file);

    User getCurrentUser();

    /**
     * 获取用户总数
     */
    Long count();
} 